package priv.dajie.tzzq.spider.model;

import priv.dajie.tzzq.model.QualityName;

public class ItemInfo {
    protected String id;
    protected QualityName qualityName;
    protected String rarity;
    protected String hero;
    protected String steamName;
    protected Platform platform;

    public ItemInfo(){

    }

    public ItemInfo(String id, QualityName qualityName, String rarity, String hero, String steamName, Platform platform) {
        this.id = id;
        this.qualityName = qualityName;
        this.rarity = rarity;
        this.hero = hero;
        this.steamName = steamName;
        this.platform = platform;
    }

    public String getId() {
        return id;
    }

    public QualityName getQualityName() {
        return qualityName;
    }

    public String getRarity() {
        return rarity;
    }

    public String getHero() {
        return hero;
    }

    public String getSteamName() {
        return steamName;
    }

    public Platform getPlatform() {
        return platform;
    }

    public void setSteamName(String steamName) {
        this.steamName = steamName;
    }

    public void setId(String id) {
        this.id = id;
    }

    public void setQualityName(QualityName qualityName) {
        this.qualityName = qualityName;
    }

    public void setRarity(String rarity) {
        this.rarity = rarity;
    }

    public void setHero(String hero) {
        this.hero = hero;
    }

    public void setPlatform(Platform platform) {
        this.platform = platform;
    }

    @Override
    public boolean equals(Object obj) {
        if(obj instanceof ItemInfo){
            return this.id.equals(((ItemInfo) obj).getId());
        }
        return false;
    }

    @Override
    public String toString() {
        return "ItemInfo{" +
                "id='" + id + '\'' +
                ", qualityName=" + qualityName +
                ", rarity='" + rarity + '\'' +
                ", hero='" + hero + '\'' +
                ", steamName='" + steamName + '\'' +
                ", platform=" + platform +
                '}';
    }
}
